#include <cstdio>

int main( )
{
    int T, n, f[ 21 ], i, t = 1;
    f[ 1 ] = 1;
    for ( i = 2; i <= 20; i++ )
    {
        f[ i ] = t + ( 1 << ( i - 1 ) );
        t += f[ i ];
    }
    scanf("%d", &T);
    while ( T-- )
    {
        scanf("%d", &n);
        printf("%d\n", f[ n ]);
    }
    return 0;
}
